package org.infodavid.common.model;

import java.util.Map;

import org.infodavid.common.persistence.ICommented;
import org.infodavid.common.persistence.IDataObject;
import org.infodavid.common.persistence.INamed;

/**
 * The Interface ICategory.
 */
public interface ICategory<T extends ICategory<T>> extends IDataObject<Long>, INamed, ICommented {
  /** The SUBCATEGORIES. */
  final String SUBCATEGORIES = "subCategories";

  /** The PARENT. */
  final String PARENT = "parent";

  /** The CATEGORY. */
  final String CATEGORY = "category";

  /**
   * Gets the parent.
   * @return the parent
   */
  T getParent();

  /**
   * Sets the parent.
   * @param value the new parent
   */
  void setParent(T value);

  /**
   * Adds the sub category.
   * @param value the value
   */
  void addSubCategory(T value);

  /**
   * Removes the sub category.
   * @param value the value
   */
  void removeSubCategory(T value);

  /**
   * Returns the sub-categories.
   * @return the sub-categories
   */
  Map<String,T> getSubCategories();
}
